<p-panel [collapsed]="false" header="筛选查询" [collapsed]="false" headerClass="bg-eaeaea border-none" headerClass="bg-eaeaea border-none"
    [(searchText)]="searchObj.searchValue" maxlength="50" search="工队名称/手机号/姓名/用户名" (onSearch)="search();dt.reset();">
    <!-- <p-header>
                <span class="border-l-1a8fe8 p-l-8">搜索条件 </span>
            </p-header> -->
    <div class="p-2-8">
        <div class="inline-block">
            <span class="p-r-10 opacity06">工种： </span>
            <p-dropdown placeholder="全部" styleClass="width-150 m-r-30" [options]="workTypeArr" [(ngModel)]="selectedObj.workType"
                [ngModelOptions]="{standalone: true}" optionLabel="name" (onChange)='search($event);dt.reset();'></p-dropdown>
        </div>
        <div class="inline-block">
            <span class="p-r-10 opacity06">状态：</span>
            <p-dropdown placeholder="全部" styleClass="width-150 m-r-30" [options]="workerStatusArr" [(ngModel)]="selectedObj.status"
                [ngModelOptions]="{standalone: true}" optionLabel="name" (onChange)='search($event);dt.reset();'></p-dropdown>
        </div>
        <!-- <div class="inline-block width-250 pull-right">
                    <div class="relative">
                        <input type="text" pInputText [(ngModel)]="searchObj.searchValue" class="width-full p-input" placeholder="工队名称/手机号/姓名/用户名"
                            (keyUp.enter)="search()">
                        <span class="icon-search-right" (click)="search()"></span>
                    </div>
                </div> -->
    </div>
</p-panel>
<div class="content-section implementation">
    <p-dataTable #dt [value]="listData" [marginHeight]="20" [totalRecords]="totalRecords" scrollable="true"
        [lazy]="true" (onLazyLoad)="loadCarsLazy($event)" [paginator]="paginator" [(selection)]="selectedItem"
        [headerCheckboxToggleAllPages]="true">
        <p-header>
            <!-- <button pButton type="button" label="添加" class="btn btn-secondary" (click)="add()"></button> -->
            <button pButton type="button" label="停止接单" class="btn btn-secondary" (click)='stopOrder()'></button>
        </p-header>
        <p-column [style]="{'width':'46px'}" selectionMode="multiple"></p-column>
        <p-column *ngFor="let col of colsSelected" [field]='col.field' [header]='col.header' [sortable]="col.sortable">
            <ng-template let-index='rowIndex' let-data='rowData' pTemplate='body' *ngIf="col.tem">

                <!-- <div *ngIf="col.field === 'code'" (click)="info(data)" style="color:#1a91eb;cursor:pointer;">
                            {{data.code}}
                        </div> -->
                <div *ngIf="col.field === 'code'">
                    <a class="color-1a91eb" [title]="data[col.field]"  target="_blank" [routerLink]="['/saas/engineer/constructionteam/worker/', data.id]"> {{data.code}} </a>
                </div>
            </ng-template>
        </p-column>
    </p-dataTable>
</div>


<!-- <div class="p-15">
    <p-panel [toggleable]="true" class="b-b-25">
        <p-header class="searchTitle">
            <i class="fa fa-search" style="font-size:30px;padding: 0 10px;"></i>
            搜索条件
        </p-header>
        <div class="ui-g">
            <div class="ui-g-12 ui-md-6 ui-lg-2">
                <p-dropdown placeholder="请选择工种" [style]="{width: '100%'}" [options]="workTypeArr" [(ngModel)]="selectedObj.workType" [ngModelOptions]="{standalone: true}"
                    optionLabel="name" (onChange)='search($event)'></p-dropdown>
            </div>

            <div class="ui-g-12 ui-md-6 ui-lg-2">
                <p-dropdown placeholder="请选择状态" [style]="{width: '100%'}" [options]="workerStatusArr" [(ngModel)]="selectedObj.status" [ngModelOptions]="{standalone: true}"
                    optionLabel="name" (onChange)='search($event)'></p-dropdown>
            </div>

            <div class="ui-g-12 ui-md-6 ui-lg-2">
                <div class="ui-inputgroup">
                    <input type="text" pInputText [(ngModel)]="searchObj.searchValue" placeholder="工队名称/手机号/姓名/用户名" style="width: 100%;" (keyUp.enter)="search()">
                    <button pButton type="button" icon="fa fa-search" class="ui-button-secondary p-input" (click)="search()"></button>
                </div>
            </div>

        </div>
    </p-panel>

    <div class="content-section implementation b-b-25">
        <p-dataTable [value]="listData" [totalRecords]="totalRecords" [rows]="5" [rowsPerPageOptions]="[5,10,20]" [loading]="loading"
            [lazy]="true" (onLazyLoad)="loadCarsLazy($event)" scrollHeight="100px" [paginator]="true" [pageLinks]="4" [(selection)]="selectedItem"
            selectionMode="single" [headerCheckboxToggleAllPages]="false" (onRowSelect)="onRowSelect($event)">
            <p-header class="clearfix">
                <div class="pull-left">
                    <button pButton type="button" (click)="add()" label="添加" class="ui-button-secondary p-btn"></button>
                    <button pButton type="button" icon="fa-stop" label="停止接单" class="ui-button-secondary" [ngClass]="{'v-bottom': true}" (click)='stopOrder()'></button>
                    <p-multiSelect dropIcon="fa-cog" [options]="cols" optionLabel="header" [styleClass]="'v-bottom'" [(ngModel)]="colsSelected"></p-multiSelect>
                </div>
            </p-header>
            <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
            <p-column *ngFor="let col of colsSelected" [field]='col.field' [header]='col.header'>
                <ng-template let-index='rowIndex' let-data='rowData' pTemplate='body' *ngIf="col.tem">
                </ng-template>
            </p-column>
        </p-dataTable>
    </div>
</div> -->
